{ ... }:

{
  programs = {
    powerline-go.enable = true;

    zsh = {
      enable = true;
      enableCompletion = true;
      autosuggestion.enable = true;

      # 别名
      shellAliases = {
        rewrite = "defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock;";
        clean = "sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +1 && sudo nix-env --profile /nix/var/nix/profiles/per-user/root/channels --delete-generations +1 && nix-env --delete-generations +1 && nix-collect-garbage --delete-old && nix-store --gc --print-roots && nix-store --optimise && mac-cleanup && echo > /Users/daria/.zsh_history";
        rebuild = "nix run nix-darwin/master -- switch --flake /Users/daria/.config/nix-darwin#Daria";
        switch = "rm -rf /Users/daria/.vscode/extensions && home-manager switch --flake /Users/daria/.config/home-manager#daria -b backup";

        set-proxy = "export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890";
        unset-proxy = "unset https_proxy http_proxy all_proxy";
      };

      sessionVariables = {
        # homebrew镜像源
        HOMEBREW_BREW_GIT_REMOTE = "https://mirrors.ustc.edu.cn/brew.git";
        HOMEBREW_CORE_GIT_REMOTE = "https://mirrors.ustc.edu.cn/homebrew-core.git";
        HOMEBREW_BOTTLE_DOMAIN = "https://mirrors.ustc.edu.cn/homebrew-bottles";
        HOMEBREW_API_DOMAIN = "https://mirrors.ustc.edu.cn/homebrew-bottles/api";
        HOMEBREW_PIP_INDEX_URL = "https://mirrors.aliyun.com/pypi/simple/";
        HOMEBREW_INSTALL_FROM_API = 1;

        # go
        # GOPATH = "/opt/go-path";
        # GOBIN = "/opt/go-path/bin";
        # GO111MODULE = "on";
        # GOPROXY = "https://goproxy.cn,direct";
        # GOSUMDB = "sum.golang.org";
        # GOCACHE = "/opt/go-cache";

        # rust
        # RUSTUP_DIST_SERVER = "https://rsproxy.cn";
        # RUSTUP_UPDATE_ROOT = "https://rsproxy.cn/rustup";
        # CARGO_HOME = "/opt/cargo";
        # RUSTUP_HOME = "/opt/rustup";

        # nvm
        NVM_DIR = "/opt/homebrew/opt/nvm";

        # flutter
        # PUB_HOSTED_URL = "https://pub.flutter-io.cn";
        # FLUTTER_STORAGE_BASE_URL = "https://storage.flutter-io.cn";
        # CHROME_EXECUTABLE = "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge";

        # huggingface
        # HF_ENDPOINT = "https://hf-mirror.com";

        # uv
        # UV_CACHE_DIR = "/opt/uv-cache";
        # UV_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple";
        # PIP_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple";
        # PIP_TRUSTED_HOST = "pypi.tuna.tsinghua.edu.cn";

        # sdkman
        SDKMAN_DIR = "/opt/sdkman";
        JAVA_HOME = "$SDKMAN_DIR/candidates/java/current";
        KOTLIN_HOME = "$SDKMAN_DIR/candidates/kotlin/current";
        GRADLE_HOME = "$SDKMAN_DIR/candidates/gradle/current";

        # deno
        # DENO_DIR = "/opt/deno-cache";
        # DENO_INSTALL_ROOT = "/opt/deno";

        # bun
        # BUN_INSTALL = "/opt/bun";

        # composer
        # COMPOSER_VENDOR_DIR = "/opt/vendor";

        # PATH = "$PATH:$GOPATH:$GOBIN:$GOROOT/bin:\"$DENO_INSTALL_ROOT/bin\"\"$BUN_INSTALL/bin\":\"$COMPOSER_VENDOR_DIR/bin\"";

        # https://3.jetbra.in
        ___MY_VMOPTIONS_SHELL_FILE = "$HOME/.jetbrains.vmoptions.sh";
      };

      initExtra = "source \"$NVM_DIR/nvm.sh\"\nsource \"$NVM_DIR/etc/bash_completion.d/nvm\"\nsource \"$SDKMAN_DIR/bin/sdkman-init.sh\"\nsource \"$___MY_VMOPTIONS_SHELL_FILE\"";
    };
  };
}
